<%- include("./top.html") %>
<%- include("./side.html") %>
<link rel="stylesheet" href="/css/back-home.css">

<div class="common-back-content" id="link" v-cloak>
	<div class="back-main">
		<div class="topd mb10 inline-block" @click="addLink"><a href="javascript:"><span>新增友链</span><span class="icon"></span></a></div>
		<div class="content mt10">
			<table class="table">
				<tr>
					<th class="w-80">序号</th>
					<th>友链名称</th>
					<th>友链链接</th>
					<th>操作</th>
				</tr>
				<tr v-for="(item,i) in datalist">
					<td class="tc">{{i+1}}</td>
					<td class="tc">{{item.linkName}}</td>
					<th class="tc">{{item.lineHref}}</th>
					<td class="tc">
						<a href="javascript:" @click="updateLink(item)">修改</a> |
						<a href="javascript:" @click="deleteLink(item)">删除</a>
					</td>
				</tr>
			</table>
			<!--  分页 -->
			<div class="tr clearfix mt30">
				<div id="copot-page"></div>
			</div>
		</div>
	</div>

	<modal
		:show.sync="editPicObj.show"
		width="480"
		height="250"
		title="编辑友链"
		>
		<div slot="modal-body">
			<div class="avator-wapper">
				<div class="block">
					<span class="left">名称:</span>
					<input v-model.trim="edit.linkName" type="text">	
				</div>
				<div class="block mt10">
					<span class="left">链接:</span>
					<input v-model.trim="edit.lineHref" type="text">	
				</div>
				<div class="tc submit">
					<button
						@click="editPic()" 
						class="moco-btn moco-btn-blue inline_block mr10">确认</button>
					<button
						@click="editPicObj.show=false" 
						class="moco-btn moco-btn-normal inline_block">取消</button>
				</div>
			</div>
		</div>
	</modal>

</div>
<script src="/js/back-link.js"></script>
